package com.oto.web.model;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "pack", propOrder = { "flows" })
public class XmlPack {

	@XmlAttribute(name = "pack_no")
	protected long id;
	@XmlAttribute(name = "pack_name")
	protected String name;
	@XmlAttribute(name = "pack_type")
	protected String type;

	@XmlElement(name = "flow")
	protected List<XmlFlow> flows;

	public List<XmlFlow> getFlows() {
		if (flows == null) {
			flows = new ArrayList<XmlFlow>();
		}
		return this.flows;
	}

	public long getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	public String getType() {
		return type;
	}

	public void setFlows(List<XmlFlow> flows) {
		this.flows = flows;
	}

	public void setId(long id) {
		this.id = id;
	}

	public void setName(String value) {
		this.name = value;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Override
	public String toString() {
		return "XmlPack [id=" + id + ", name=" + name + ", type=" + type + ", flows=" + flows + "]";
	}
}
